<template>
  <div class="anomaly">
    <el-card class="box-card">
      <h1>异常表单</h1>
      <div class="fl workshop" ref="workshop"></div>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      option: {
        legend: {},
        tooltip: {},
        dataset: {
          dimensions: ["product", "故障次数", "停机次数", "维修次数"],
          source: [
            {
              product: "一号机器",
              故障次数: 43.3,
              停机次数: 85.8,
              维修次数: 93.7,
            },
            {
              product: "二号机器",
              故障次数: 83.1,
              停机次数: 73.4,
              维修次数: 55.1,
            },
            {
              product: "三号机器",
              故障次数: 86.4,
              停机次数: 65.2,
              维修次数: 82.5,
            },
            {
              product: "四号机器",
              故障次数: 72.4,
              停机次数: 53.9,
              维修次数: 39.1,
            },
            {
              product: "五号机器",
              故障次数: 72.4,
              停机次数: 53.9,
              维修次数: 39.1,
            },
            {
              product: "六号机器",
              故障次数: 72.4,
              停机次数: 53.9,
              维修次数: 39.1,
            },
            {
              product: "七号机器",
              故障次数: 72.4,
              停机次数: 53.9,
              维修次数: 39.1,
            },
            {
              product: "八号机器",
              故障次数: 72.4,
              停机次数: 53.9,
              维修次数: 39.1,
            },
            {
              product: "九号机器",
              故障次数: 72.4,
              停机次数: 53.9,
              维修次数: 39.1,
            },
            {
              product: "十号机器",
              故障次数: 72.4,
              停机次数: 53.9,
              维修次数: 39.1,
            },
          ],
        },
        xAxis: { type: "category" },
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [{ type: "bar" }, { type: "bar" }, { type: "bar" }],
      },
    };
  },
  mounted() {
    this.ProgressStatus();
  },
  methods: {
    ProgressStatus() {
      //   车间进度
      let workshop = this.$echarts.init(this.$refs.workshop);
      console.log(workshop);
      workshop.setOption(this.option);
    },
  },
};
</script>

<style lang="less" scoped>
@import "../../../assets/css/plan.less";
</style>
